Overlay network clients, such as Virtual Machines (VMs), need default gateways to provide routing functionality. In overlay networks, the data link layer (layer 2 of the Open Systems Interconnection (OSI) model (ISO/IEC 7498-1)) is concerned with moving data across the physical links in the network. In a network, the switch is a device that redirects data messages at the layer 2 level, using the destination Media Access Control (MAC) address to determine where to direct the message. Layer 2 contains two sublayers: the MAC sublayer and the logical link control (LLC) sublayer. Layer 2 ensures that an initial connection has been set up, divides output data into data frames, and handles the acknowledgements from a receiver that the data arrived successfully.
Network virtualization that use overlay networks allow for VM migration from one hypervisor to another. The hypervisors may be located on different Internet protocol (IP) subnets. Switches on the hypervisors encapsulate traffic for a destination VM's associated hypervisor before delivering the traffic to an IP cloud, and on the way to the destination hypervisor. A virtual network provides an administrative boundary established by a data center operator. A virtual network should provide the same or more functionality than physical networks that they are virtualizing.